-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove usage of float keys in arrays tests #6662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine apart from the indicated tests.
@@ -2,7 +2,7 @@ | |||
basic array_fill test | |||
--FILE-- | |||
<?php | |||
$array1 = array(0.0, 1, 2.5); | |||
$array1 = array(0, 1, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored it
@@ -1,51 +0,0 @@ | |||
--TEST-- | |||
Test array_key_exists() function : usage variations - floats and casting to ints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is important to keep -- array_key_exists behavior with floats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored it
@@ -46,13 +46,9 @@ $arrays = array ( | |||
array("1" => 1), | |||
array("one" => 1, 'two' => 2, "three" => 3, 4 => 4), | |||
|
|||
// arrays with float values | |||
/*5*/ array("float" => 2.3333), | |||
array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => 33333333.333333), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not particularly important, but these two look unrelated? Those are float values only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, don't know why I went and removed those
Also make test output not produce trailling whitespaces
77140b0
to
fbc495d
Compare
Also make test output not produce trailling whitespaces
This is in preparation for #6661 as this would just distract from the other PR, and these tests are rather useless.